package com.srcptit.java.training.dungvv.btvn1;

import java.util.Scanner;

public class B4_nso_ngto {
	public static void main(String [] args){
		int n, dem = 1, i = 2;
		Scanner sc = new Scanner(System.in);
		System.out.println("Moi ban nhap vao so cac so nguyen to can liet ke");
		n = sc.nextInt();
		while (dem<=n){
			int ngto = 1;
			for (int j = 2; j <= i; j++)
				if (i % j==0) ngto++;
			if (ngto == 2){
				System.out.print(i+" ");
				dem++;
			}
			i++;	
		}
	}
}

